#include "pushWithRtmp.h"

namespace sp::Image::Push{

void register_pushWithRtmp(){
    pushWithRtmp::registe();
}

pushWithRtmp::pushWithRtmp(std::vector<std::string> v){
    assert(v.size() == 0);
    name = "pushWithRtmp";
    class_name = "Image-Push-pushWithRtmp";
    data_type_support.push_back(std::pair<std::vector<uint8_t>, uint8_t>({MAT},UNKNOW));
}

pushWithRtmp::pushWithRtmp(){
    name = "pushWithRtmp";
    class_name = "Image-Push-pushWithRtmp";
    data_type_support.push_back(std::pair<std::vector<uint8_t>, uint8_t>({MAT},UNKNOW));
}

pushWithRtmp::~pushWithRtmp(){

}

void pushWithRtmp::registe(){
    Function::Register("Image-Push-pushWithRtmp", createObject);
    Function::Register("Image-Push-pushWithRtmp", createObject2);
}

Function* pushWithRtmp::createObject(std::vector<std::string> params){
    return new pushWithRtmp(params);
}

Function* pushWithRtmp::createObject2(){
    return new pushWithRtmp();
}

void pushWithRtmp::start(){

}

bool pushWithRtmp::waitForResource(){
    return true;
}

void pushWithRtmp::process(std::vector<std::vector<Data*>>& data_input, std::vector<Data*>& data_output){
    assert(batch_size != 0);
    assert(data_input.size() <= batch_size);
    assert(data_input[0].size() == 1);
}

bool pushWithRtmp::releaseResource(){
    return true;
}

void pushWithRtmp::finish(){

}

void pushWithRtmp::copy(Function* other){
    Function::defaultCopy(other);
    pushWithRtmp* oth = dynamic_cast<pushWithRtmp*>(other);
}

};